package nccloud.sso.util;

import java.net.URLEncoder;


/**
 * 测试生成oa待办的url
 * 
 * @author wzx
 *
 */

public class TestOAApproveURL {
	public static void main(String[] args) {
		
		StringBuilder builder = new StringBuilder();
		builder.append("http://127.0.0.1:8888/nccloud/sso/visit.action?");
//		.append("apprparam=");

		String pk_message = "0001AA1000000000R08M";
		String billno = "DRSQ202108050001";
		String appcode= "452003004P";
		String pagecode= "452003004A_card";
		String usercode = "C292918";
		String pk_bill = "1001AA10000000003R4M";
		
		// 参数列表
		StringBuilder desBuilder = new StringBuilder();
		desBuilder.append("pk_message=").
		append(pk_message).append("&billno=").append(billno).append("&pk_bill=").append(pk_bill)
				.append("&c=").append(appcode).append("&p=").append(pagecode).append("&usercode=").append(usercode);

		try {
			builder.append(desBuilder.toString());
			
			String a = "AWLciMpRY8UWRENeqyjzXoqLZ85PQ+mDBQsMnmdf4AoUyaeWSBveuXl7K0Og1F0SvyoosahR70a0" + 
					"CBPZb8ENYf7ZsmcfG1syXqzhxOlPaqqGmIwmcjHizw==";
			
			String b = "AWLciMpRY8UWRENeqyjzXoqLZ85PQ+mDBQsMnmdf4AoUyaeWSBveuXl7K0Og1F0SvyoosahR70a0" + 
					"CBPZb8ENYf7ZsmcfG1syXqzhxOlPaqqGmIwmcjHizw==";
			String a1 = DesUtil.decrypt(a);
			String b1 = DesUtil.decrypt(b);
			System.out.println(a1);
			System.out.println(b1);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		//生成的url在浏览器访问即可实现访问
		String pcUrl = builder.toString();
		System.out.println(pcUrl);
	}
}
